Skip to content

Add space in "operator<<<...>" to avoid syntax error when targeting GPU#583

Open
fxzjshm wants to merge 1 commit intosewenew:masterfrom
fxzjshm:fix-gpu-kernel-syntax
Open

Add space in "operator<<<...>" to avoid syntax error when targeting GPU#583
fxzjshm wants to merge 1 commit intosewenew:masterfrom
fxzjshm:fix-gpu-kernel-syntax

Conversation

@fxzjshm
Copy link

@fxzjshm fxzjshm commented Jul 28, 2024

CUDA/ROCm C++ has additional operator "<<< >>>" to invoke GPU kernel,
so compile error is given here:

In file included from /home/fxzjshm/workspace/project/deps/redis-plus-plus/src/sw/redis++/redis++.h:20:
In file included from /home/fxzjshm/workspace/project/deps/redis-plus-plus/src/sw/redis++/redis.h:29:
In file included from /home/fxzjshm/workspace/project/deps/redis-plus-plus/src/sw/redis++/subscriber.h:25:
In file included from /home/fxzjshm/workspace/project/deps/redis-plus-plus/src/sw/redis++/command.h:26:
/home/fxzjshm/workspace/project/deps/redis-plus-plus/src/sw/redis++/command_args.h:136:20: error: expected a type
  136 |     return operator<<<N + 1, Args...>(arg);
      |                    ^
/home/fxzjshm/workspace/project/deps/redis-plus-plus/src/sw/redis++/command_args.h:136:30: error: 'Args' does not refer to a value
  136 |     return operator<<<N + 1, Args...>(arg);
      |                              ^
/home/fxzjshm/workspace/project/deps/redis-plus-plus/src/sw/redis++/command_args.h:131:38: note: declared here
  131 | template <std::size_t N, typename ...Args>
      |                                      ^
2 errors generated when compiling for gfx1035.

added a space to avoid syntax error.

CUDA/ROCm C++ has additional operator "<<< >>>" to invoke GPU kernel,
add a space here to avoid syntax error.

Signed-off-by: fxzjshm <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant